package com.baidu.ota.presenter;

import android.content.Context;

public interface IUpgradePresenter {
    int STATE_INIT = 0;
    int STATE_DOWNLOADING = 1;
    int STATE_DOWNLOAD_SUCCESS = 2;
    int STATE_DOWNLOAD_FAIL = 3;
    int STATE_DOWNLOAD_PAUSED = 4;
    int STATE_UPGRADING = 5;
    int STATE_UPGRADE_FAIL = 6;
    int STATE_UPGRADE_SUCCESS = 7;
    int STATE_UPGRADE_WRITE_DONE = 8;

    /**
     * 开始下载
     */
    void download(String pkg);

    /**
     * 暂停下载
     */
    void cancelDownload(String pkg);

    /**
     * 开始升级
     */
    void upgrade(String pkg);

    /**
     * 重启设备
     */
    void reboot(Context context);
}
